// components/count/count.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    count: {
      type:Number,
      value: 1
    },
     
       _id: String,
  },

  /**
   * 组件的初始数据
   */
  data: {

  },

  /**
   * 组件的方法列表
   */
  methods: {
    add( ) {
      let count = this.data.count +1
     console.log(count)
      this.triggerEvent('add', count)
    },
    cut(res) {
      if(this.data.count > 1) {
        this.data.count--;
      }
      let count = this.data.count
      console.log(count)
      this.triggerEvent('add', count)
    }
  }
})
